package cn.com.server.controller.systemManage;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.Page;

import cn.com.server.common.AjaxCodeUtil;
import cn.com.server.common.AjaxObject;
import cn.com.server.service.WebLogsService;
import cn.com.server.extend.model.WebLogsModel;
import cn.com.server.extend.view.WebLogsView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * <p>
 * web日志表 前端控制器
 * </p>
 *
 * @author qing
 * @since 2017-11-22
 */
@Controller
@RequestMapping("/systemManage/webLogs")
public class WebLogsController {
	
	@Autowired
	private WebLogsService webLogsService;
	
	@RequestMapping("/webLogsList")
	public String webLogsList(HttpServletRequest request, HttpServletResponse response) {
		return "/systemManager/webLogsList";
	}
	
	@RequestMapping("/getWebLogsList")
	@ResponseBody
	public AjaxObject getWebLogsList(WebLogsModel model,HttpServletRequest request, HttpServletResponse response,HttpSession session) {
		Page<WebLogsView> pageData = webLogsService.selectWebLogsViewList(model);
		AjaxObject ajaxObject = AjaxCodeUtil.getAjaxObject("success");
		ajaxObject.setData(pageData);
		return ajaxObject;
	}
}
